<div class="h-100 w-100 d-flex align-items-center justify-content-center">
    <div class="card text-center w-25 mx-auto">
        <div class="card-header">
            Управление сессиями
        </div>
        <div class="card-body align-items-center justify-content-center">
        @if(!auth()->user()->hasActive())
            <a href="{{ route('session.open.page',
                ['server_ip' => $ip, 'connection' => $connection, 'user_id' => auth()->user()->id]) }}">
                <div class="input-group-btn p-2 w-auto">
                    <x-bladewind.button class="p-2"  can_submit="true">
                        Открыть новую сессию
                    </x-bladewind.button>
                </div>
            </a>
        @else
            <form method="POST"
                  action="{{ route('session.close', ['user_id' => auth()->user()->id, 'server_ip' => $ip, 'connection' => $connection]) }}">
                @csrf
                <div class="input-group-btn p-2 w-auto">
                    <x-bladewind.button class="p-2"  can_submit="true" color="red">
                        Закрыть сессию
                    </x-bladewind.button>
                </div>
            </form>

            <div class="input-group-btn p-2 w-auto">
                <a href="{{ route('session.get', ['user_id' => auth()->user()->id, 'server_ip' => $ip, 'connection' => $connection]) }}" >
                    <x-bladewind.button class="p-2"  can_submit="true">
                        Открыть текущую сессию
                    </x-bladewind.button>
                </a>
            </div>
        @endif
        </div>
    </div>
</div>

